package com.whsxt.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-03-29 10:00
 * @Description:
 */
public class SnowUtil {


    /**
     * 全局唯一的
     */
    public static Snowflake snowflake = IdUtil.createSnowflake(1, 1);

   /* public static void main(String[] args) {
        //源码是每次都new一个，有可能会重复，所以在内存当中放一个

        Snowflake snowflake = IdUtil.createSnowflake(1, 1);
        String id = snowflake.nextIdStr();
        System.out.println(id);
    }*/



}
